package com.example.AIstudy.service;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.AIstudy.domain.Exercise;
import com.example.AIstudy.domain.LevelRecord;
import com.example.AIstudy.exception.AIstudyException;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectKey;

import java.util.List;
import java.util.Map;

public interface ExerciseService extends IService<Exercise> {

    //分页获取练习题
    public IPage<Exercise> findExercise(Map<String, Object> condition, Integer pageNum, Integer pageSize);

    //新增一个学生的学习周记录
    void insertExercise(List<Exercise>exercises)throws AIstudyException;

    //获取子练习题（属于同一道大题）
    public List<Exercise> findSonExercise(List<Integer>questionID);

    public void updateExercise(List<Exercise>exercise) throws AIstudyException;

    public void deleteExercise(List<Integer>questionID) throws AIstudyException;

    public List<Exercise> getExerviceByesList(List<String>esids) throws AIstudyException;

    public String selectSonProID(Integer exerciseID);

    public Exercise selectByesID(String esID);
    public Exercise fengzhuangYuedu(Exercise exercise);
}
